// /**
//  * Copyright © 2013-2017 Magento, Inc. All rights reserved.
//  * See COPYING.txt for license details.
//  */

//
//  Common
//  _____________________________________________

& when (@media-common = true) {

    .table-wrapper.grouped {
        width: auto;
    }

    .table.grouped {
        .row-tier-price {
            > td {
                border-top: 0;
            }
        }

        .col.item {
            width: 90%;
        }

        .col.qty {
            width: 10%;

            .control.qty {
                .qty {
                    &:extend(.abs-input-qty all);
                }
            }
        }

        .product-item-name {
            display: inline-block;
            font-weight: @font-weight__regular;
            margin-bottom: @indent__s;
        }

        .price-box {
            p {
                margin: 0;
            }

            .price {
                font-weight: @font-weight__bold;
            }

            .old-price {
                .price {
                    font-weight: normal;
                }
            }
        }

        .stock.unavailable {
            font-weight: normal;
            margin: 0;
            text-transform: none;
            white-space: nowrap;
        }
    }

    .page-product-grouped {
        .product-info-main {
            .alert {
                clear: left;
            }
        }
    }
}

//
//  Mobile
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__s) {
    .table.grouped {
        > thead {
            > tr {
                > th {
                    .lib-css(border-bottom, @table__border-width @table__border-style @table__border-color);
                    display: table-cell;
                }
            }
        }

        > tbody {
            .lib-css(border-bottom, @table__border-width @table__border-style @table__border-color);

            > tr {
                > td {
                    &:extend(.abs-col-no-prefix all);
                    .lib-css(padding, @table-cell__padding-vertical @table-cell__padding-horizontal);
                    border: 0;
                    display: table-cell;
                }
            }
        }

        .table-wrapper & {
            &:not(.totals):not(.cart):not(.table-comparison) {
                > tbody {
                    > tr {
                        > td {
                            &:last-child {
                                border-bottom: 0;
                            }
                        }
                    }
                }
            }
        }
    }

    .page-product-grouped {
        .minimal-price {
            margin: 0;
        }

        .product-info-price {
            border: 0;
            margin-bottom: 0;

            .price-box {
                padding-bottom: 0;
            }
        }
    }
}

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) {
    .table-wrapper.grouped {
        .lib-css(margin-left, -@layout__width-xs-indent);
        .lib-css(margin-right, -@layout__width-xs-indent);
    }
}

//
//  Desktop
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
    .page-product-grouped {
        .product-info-price {
            float: none;
        }

        .minimal-price {
            margin-top: -8px;
        }
    }
}
